package com.lzw.mapper.admin;

import com.lzw.pojo.SupplierReturns;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface SupplierReturnsManage2Mapper {
    List<SupplierReturns> list(@Param("supplier") String supplier, @Param("medicine") String medicine, @Param("returnDate") LocalDate returnDate);

    @Insert("INSERT INTO pharmacymanagement.supplierreturns (quantity_returned, return_date, reason, supplier, medicine) VALUES (#{quantityReturned}, #{returnDate}, #{reason}, #{supplier}, #{medicine})")
    void add(SupplierReturns supplierReturns);

    void update(SupplierReturns supplierReturns);
}
